import request from "@/utils/request";

//定时轮询--机器人数据
export function jqrdataCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/jqrconn",
    method: "get",
    params: query,
  });
}
//查询机器人列表 不含分页
export function listonPageRobotConfig(query) {
  return request({
    url: '/ptwn/robotconfig/lists',
    method: 'get',
    params: query
  })
}
//机器人配置数据
export function robotInfo(query){
  return request({
      url:'/ptwn/robotconfig/robotInfo',
      method:'get',
      params: query
  })
}

//机器人模式设置
export function msszCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/mssz",
    method: "get",
    params: query,
  });
}
//自由模式机器人模式设置
export function zymsmsszCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/zymsmssz",
    method: "get",
    params: query,
  });
}
//机器人 (暂停)
export function robotstopCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/robotstop",
    method: "get",
    params: query,
  });
}

///////手动模式/////////////
//巡检点
export function xjdCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/pointask",
    method: "get",
    params: query,
  });
}
//机器人速度选择
export function jqrsdCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/velocity",
    method: "get",
    params: query,
  });
}
//手动模式(启动)
export function robotrunCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/robotrun",
    method: "get",
    params: query,
  });
}
//任务执行
export function acktaskCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/acktask",
    method: "get",
    params: query,
  });
}
//任务停止
export function stoptaskCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/stoptask",
    method: "get",
    params: query,
  });
}
//执行返行
export function backtaskCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/backtask",
    method: "get",
    params: query,
  });
}
//停止
export function stopCmd(query) {
  return request({
    url: "/ptwn/modbuscmd/robotstop",
    method: "get",
    params: query,
  });
}



////////自动模式//////////
//自动模式速度设定设置
export function xjsdCmd(query) {
    return request({
      url: '/ptwn/modbuscmd/xjsd',
      method: 'get',
      params: query
    })
  }
  //自动模式启动
export function zdqdCmd(query) {
    return request({
      url: '/ptwn/modbuscmd/zdqd',
      method: 'get',
      params: query
    })
  }
  //定点视频
export function ddspCmd(query) {
    return request({
      url: '/ptwn/modbuscmd/ddsp',
      method: 'get',
      params: query
    })
  }
  //连续视频
export function lxspCmd(query) {
    return request({
      url: '/ptwn/modbuscmd/lxsp',
      method: 'get',
      params: query
    })
  }

  /////////一键返航///////////
  //一键返航
export function yjfhCmd(query) {
    return request({
      url: '/ptwn/modbuscmd/yjfh',
      method: 'get',
      params: query
    })
  }

  //摄像头在线或离线
  export function HKonline(query) {
    return request({
      url: '/ptwn/video/HKonline/onlineStatus',
      method: 'post',
      params: query
    })
  }
